Skip to content

Conversation

@lucylq
Copy link
Contributor

@lucylq lucylq commented Nov 20, 2025

Seeing error when important flat tensor deserializer

(executorch) [lfq@devvm311.ldc0 /data/users/lfq/executorch (aff5086f)]$ python debug-lora.py 
Traceback (most recent call last):
  File "/data/users/lfq/executorch/debug-lora.py", line 1, in <module>
    from executorch.extension.flat_tensor.serialize.serialize import _deserialize_to_flat_tensor
  File "/data/users/lfq/executorch/src/executorch/extension/flat_tensor/serialize/serialize.py", line 20, in <module>
    from executorch.exir._serialize._cord import Cord
  File "/data/users/lfq/executorch/src/executorch/exir/__init__.py", line 9, in <module>
    from executorch.exir.capture import (
  File "/data/users/lfq/executorch/src/executorch/exir/capture/__init__.py", line 9, in <module>
    from executorch.exir.capture._capture import (
  File "/data/users/lfq/executorch/src/executorch/exir/capture/_capture.py", line 17, in <module>
    from executorch.exir.program import ExirExportedProgram
  File "/data/users/lfq/executorch/src/executorch/exir/program/__init__.py", line 10, in <module>
    from executorch.exir.program._program import (
  File "/data/users/lfq/executorch/src/executorch/exir/program/_program.py", line 82, in <module>
    from executorch.extension.flat_tensor.serialize.serialize import FlatTensorSerializer
ImportError: cannot import name 'FlatTensorSerializer' from partially initialized module 'executorch.extension.flat_tensor.serialize.serialize' (most likely due to a circular import) (/data/users/lfq/executorch/src/executorch/extension/flat_tensor/serialize/serialize.py)

Previously, the import happened at module load time, causing the circular dependency. Now, the import happens at runtime, and we do not hit the circular dep.

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 20, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15902

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (2 Unrelated Failures)

As of commit 061f2b5 with merge base aff5086 (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following job failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 20, 2025
@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@lucylq lucylq requested a review from Gasoonjia November 20, 2025 00:36
@lucylq lucylq force-pushed the lfq.fix-circular-dep branch from 7710e18 to 061f2b5 Compare November 20, 2025 00:47
@lucylq lucylq merged commit 65d4b94 into main Nov 20, 2025
170 of 172 checks passed
@lucylq lucylq deleted the lfq.fix-circular-dep branch November 20, 2025 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants